package com.baymax.study.base.controler;

import com.baymax.study.base.dto.ResultMsg;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * LocalTestController
 *
 * @author Baymax
 * @since 2024-07-22
 */
@RestController
@RequestMapping("/test")
public class LocalTestController {
    private static final Logger LOGGER = LoggerFactory.getLogger(LocalTestController.class);

    @GetMapping("/local")
    public ResultMsg testRest(@RequestParam(value = "param", required = false) String param) {
        LOGGER.info("LocalTestController testRest start, param: {}.", param);

        return ResultMsg.buildSuccess(param);
    }
}
